<?php
require_once('model.php');

/**
 * class brewery_model 
 * Model for the brewery table
 * 
 * @author Victor Nava
 *
 */
class brewery_model extends model {
	function __construct(){
		parent::__construct('breweries');
	}

	/**
	 * (non-PHPdoc)
	 * @see app/model#get($id)
	 */
	function get($id){
		$countryModel = new Model('countries');
		$brewery = parent::get($id);
		$brewery['country'] = $countryModel->get($brewery['countries_id']);
		unset($brewery['countries_id']);
		return $brewery;
	}
}
?>